<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch"
          action="${request.getContextPath()}/comingWip/comingWip" method="post">
        <div class="bjui-searchBar">
            <g:hiddenField name="SYS_QUERY_NAME" value="comingWip"/>
            <g:hiddenField name="EXPORT_CONTENT_NAME" value="comingWipExcel"/>
            <label>设备编号：</label>
            <g:select name="equipmentId" from="${eqpList}" data-toggle="selectpicker" data-live-search="true"
                      optionKey="equipment_id" optionValue="equipment_id" value="${equipmentId}" id="eqp"
                      data-width="200"
                      noSelection="['': 'ALL']"/>&nbsp;
            <label>工  步：</label>
            <g:select name="stepname" from="${stepnameList}" data-toggle="selectpicker" data-live-search="true"
                      optionKey="stepname" optionValue="stepname" value="${stepname}" id="step" data-width="200"
                      noSelection="['': 'ALL']"/>&nbsp;
            <label>步长：</label>
            <input type="text" name="bseq" value="${bseq}"/>&nbsp;&nbsp;&nbsp;&nbsp;<br>
            <label>产品名称：</label>
            <g:select name="partName" from="${partList}" data-toggle="selectpicker" data-live-search="true"
                      optionKey="name" optionValue="name" value="${partName}" data-size="12" data-width="200"
                      noSelection="['': '']" id="prod"/>&nbsp;

            <label>批次优先级：</label>
            <g:select name="pri" from="${priorityList}" data-toggle="selectpicker" data-live-search="true"
                      optionKey="key_id" optionValue="key_id" value="${pri}" data-width="200"
                      noSelection="['': 'ALL']"/>&nbsp;
            <button type="submit" class="btn-default" data-icon="search" id="comingSubmit">查询</button>&nbsp;
            <a type="button" class="btn btn-green"
               href="${request.getContextPath()}/comingWip/comingWip?export=xls"
               data-toggle="doexport" data-confirm-msg="确定要导出吗？" data-icon="sign-out">导出</a>
        </div>
    </form>
</div>


<div class="bjui-pageContent tableContent">
    <g:if test="${comingwipList.size() > 0}">
        <g:render template="comingWipExcel"></g:render>
    </g:if>
</div>
<script>
    var submitBtn = document.getElementById("comingSubmit");

    submitBtn.onclick = function (event) {
        var eqp = $('#eqp').val()
        var step = $('#step').val()
        alert
        if (!eqp && !step) {
            alert("设备编号和工步选一个哟")
            return false;
        }
    };
</script>